home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-18 | 2.9 KB | 111 lines | [TEXT/KAHL] |
- Listen to your hack…beat
-
- by Bernie Bernstein entirely at MacHack '93
- bernard@cs.colorado.edu
- June 16-17, 1993
-
-
- This software is freeware. Feel free to use it, modify the code, and
- take advantage of its functionality. I would like to hear about
- modifications because people are going to ask me if they have
- been done.
-
- Enjoy
-
-
-
- ---
- Thanks to Chris DiGiano, who co-authored a paper for this conference and gave
- me some sample midi code from which I wrote this hack suite.
-
- Thanks also to all the SmartFriends™ who helped me get this stuff to work,
- including Tim, Johan, Steve, Steve, Cameron, Dean, and many others.
- ---
-
-
-
- This hack requires the midi manager 2.0.1 or later.
-
- They are not very midi savvy yet. You need to manually patch them into your
- midi equipment after they begin running.
-
-
- ••••• System Extension •••••
-
- "Listen to your hack…beat" System Extension patches several system traps so
- that you can hear different sounds from different channels of your midi
- device depending on what the operation and parameters are.
-
- Only a few atraps are patched now, but the source code is all there so
- you can add more. Some day, I may make this a Control Panel so that
- you can choose which traps to patch and what types of sounds should
- be made.
-
- After booting with this system extension, you will need to patch it
- to your midi box.
-
- Currently, the synth channels are set up like this:
-
- 1 GetNextEvent
- 2 FrameRect makes pitch according to area of rect
- 3 IconUtils
- 4 TEKey makes pitch according to key pressed
-
-
-
-
- ••••• dcmd •••••
-
- Put this dcmd into your Debugger Prefs file in the system folder and you
- will then have access to your midi equipment through MacsBug or the
- debugger of your choice.
-
- Unfortunately, dcmd's can note be built from Think C. So you must have
- MPW to modify this stuff.
-
- The syntax is shown in 'help play'
-
- Start the synth with 'play on'
-
- and then patch it into your midi box.
-
- commands are
-
- play on ;signs into midi manager
- play off ;signs out (doesnt seem to work)
- play note [channel [pitch [velocity]]] ;plays a note to channel, pitch, and velocity
- play stop [channel [pitch]] ;stops playing a note
- play setchan <channel> <voice> ;sets up a channel to play the given voice
-
- If you want a note to play any time an atrap is called, do something like:
-
- atb blockmove ';play note d0&f d0&7f+10;g'
- to get a sound played on some channel with pitch varying according to the size of the
- block being moved.
-
- or for arbitrary break points:
-
- br myfunc ';play note 3 3f;g'
-
-
- as many as you like
-
-
-
-
-
- ••••• Midi Library •••••
-
- To use the library with your app, compile it with SONICAPP defined.
- (in think C, in the Prefix, in MPW in the compile 'C ... -d SONICAPP'
- #define SONICAPP
-
- Look at the Bullseye application as an example.
-
- you still need to patch it in after the app runs. Perhaps someone feels
- like fixing that, and also figuring out how to sign off from the
- midi manager.
-
- Let me know if you do it.
-
-